<template>
  <div>
    <h1>Vue Router Demo</h1>
  <button @click="backShow">后退</button> : 
  <button @click="forwardShow">前进</button>
  </div>
</template>

<script>
export default {
    name:'Bander',
    methods: {
      backShow(){
        // 编程式路由
        this.$router.back()
      },
      forwardShow(){
        // this.$router.forward()
        this.$router.go(2)
      }
    },
}
</script>

<style>

</style>